package com.chinasofti.controluser.service.impl;

import com.chinasofti.controlcommon.common.ServerResponse;
import com.chinasofti.controlcommon.domain.entity.SysMenu;
import com.chinasofti.controluser.dao.SysMenuMapper;
import com.chinasofti.controluser.service.ControlMenuServcie;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.ModelAndView;

@Slf4j
@Service
public class ControlMenuImpl implements ControlMenuServcie {

    @Autowired
    private SysMenuMapper sysMenuMapper;

	@Override
	public ServerResponse insert(SysMenu sysMenu) {

	    try{
	        sysMenuMapper.insert(sysMenu);
	     }
        catch(Exception exception){
            log.info("添加菜单异常!"+exception.getMessage());
        }
        return ServerResponse.createBySuccess("新增菜单成功!");
	}
}

